﻿@model JewererBasic.ORDER_TREE
<h2></h2>
@using (Html.BeginForm())
{
    @Html.HiddenFor(m => m.Order_Tree_Id)
    @Html.HiddenFor(m => m.MC)
    @Html.HiddenFor(m => m.DateMake)

    <fieldset>
        <a href="/TreeOrder/Index">
            <input type="button" value="Back to list Order Trees" />
        </a>

        <fieldset>
            <legend>Tree Order Detail</legend>

            @*    <p><strong class="myStrong" style="font-size: 20px">Tree Order Detail:</strong></p>*@
            <table>
                <tr>
                    <td>
                        <table class="table head">
                            <tr>
                                <th style="width: 100px;">Order Id</th>
                                <th style="width: 200px;">Date</th>
                                <th style="width: 200px;">MC</th>
                            </tr>
                            <tr>
                                <td style="width: 100px; text-align: center">@Html.DisplayFor(m => m.Order_Tree_Id)</td>
                                <td style="width: 200px; text-align: center">@Html.DisplayFor(m => m.DateMake)</td>
                                <td style="width: 200px; text-align: center">@Html.DisplayFor(m => m.MC)</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>List Trees</legend>
            @*<strong class="myStrong" style="font-size: 20px">List Trees:</strong>*@
            <table>
                <tr>
                    <td>
                        <table class="table head">
                            <tr>
                                <th style="width: 100px">Tree code</th>
                                <th style="width: 200px">Component Id</th>
                                <th style="width: 150px">Export Weight</th>
                                <th style="width: 150px">Return Weight</th>
                                <th style="width: 150px">Reject Weight</th>
                                <th style="width: 150px">Worker Id</th>
                                <th style="width: 300px">Bags</th>
                                <th style="width: 150px">Actions</th>
                            </tr>
                            @foreach (var item in Model.ORDER_TREE_DETAIL)
                            {
                                <tr>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.Order_Tree_Detail_Id)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.Component_Id)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.ExportWeight)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.ReturnWeight)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.RejectWeight)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.EMPLOYEE.Staff_Id)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.DisplayFor(modelItem => item.ListBag)
                                    </td>
                                    <td style="text-align: center">
                                        @Html.ActionLink("Detail", "TreeOrderDetailView", new { idDetail = item.Order_Tree_Detail_Id })
                                        @if (item.Finish == -1)
                                        {// has not exported
                                            @Html.ActionLink("Delete", "DeleteTreeDetail", new { idDetail = item.Order_Tree_Detail_Id, idOrder = Model.Order_Tree_Id })
                                        }
                                    </td>
                                </tr>
                            }
                        </table>
                    </td>
                </tr>
            </table>
        </fieldset>
    </fieldset>
    
}
